import { request } from "@/utils/service"
import { getToken } from "@/utils/cache/cookies"
import axios from "axios"
const baseURL = import.meta.env.VITE_BASE_API
/** 佣金改 */
export function updateApprovalApi(data: any) {
  return request({
    url: "withdrawals/submit",
    method: "post",
    data
  })
}

/** 佣金查 */
export function getApprovalDataApi(params: any) {
  return request<any>({
    url: "withdrawals/queryPage",
    method: "get",
    params
  })
}
/** 推荐改 */
export function updateRecommend(data: any) {
  return request({
    url: "/reward/submit",
    method: "post",
    data
  })
}

/** 推荐查 */
export function getRecommend(params: any) {
  return request<any>({
    url: "/reward/queryPage",
    method: "get",
    params
  })
}
// 下载
export function updategetOrderCenterApiXZ(data: any) {
  return axios({
    url: `${baseURL}/order/batchDown`,
    method: "post",
    headers: {
      "Content-Type": "multipart/form-data",
      token: getToken()
    },
    data,
    responseType: "blob"
  })
}
